import React, { Component } from 'react';
import { Maid } from '../Maid/style'
import connect from './connect'
@connect
class INDEX extends Component {
    componentDidMount() {
        // 发起网络请求
        this.props.getListCmp()
    }
    render() {
        // 异步加载容错
        let list = this.props.List ? this.props.List.toJS() : []
        let newlist = list.slice(12, 18)
        return (
            <Maid>
                <img className='img' src="https://tn1-f2.kkmh.com/image/181224/fvBVajOhz.webp-t.w320.jpg.h.p" alt="" />
                <div className='mask'></div>
                {
                    newlist.map(item => {
                        return (
                            <ul key={item.id}>
                                <li>
                                    <img src={item.image} alt="" />
                                </li>
                                <li>{item.title}</li>
                                <li>{item.mask}</li>
                                <li>{item.desc}</li>
                            </ul>
                        )
                    })
                }
            </Maid>
        );
    }
}

export default INDEX;
